local containers = require("containers")
local params = {}

--------------------------------------------------------------------------
--[[ nuts_candybag ]]
--------------------------------------------------------------------------
params.nuts_candybag =
{
    widget =
    {
        slotpos =
        {
            Vector3(0, 36 * 3 - 4, 0),
            Vector3(0, 36 - 4, 0),
            Vector3(0, -36 - 4, 0),
            Vector3(0, -36 * 3 - 4, 0),
        },
        animbank = "ui_lamp_1x4",
        animbuild = "ui_lamp_1x4",
        pos = Vector3(0, 100, 0),
    },
    type = "hand_inv",
    excludefromcrafting = true,
}

function params.nuts_candybag.itemtestfn(container, item, slot)
    return item:HasTag("halloweencandy")
end

--================================
--[[修改容器注册函数]]
--================================
for k, v in pairs(params) do
    containers.params[k] = v

    --更新容器格子数量的最大值
    containers.MAXITEMSLOTS = math.max(containers.MAXITEMSLOTS, v.widget.slotpos ~= nil and #v.widget.slotpos or 0)
end
params = nil --释放内存
